﻿@using com.hyrentals.webcommon.extensions
@using com.hyrentals.webportal.Config

@{
    Html.AddStyle("css/auth");
    Html.AddTailScript("js/login");
    string account = ViewBag.Account;
}

<div class="layout-primary lg">
    <div class="layout-primary-left"></div>
    <div class="layout-primary-middle">
        <div class="login-region">
            <p class="title">Log in</p>
            <form id="lg_frm" class="auth-form" action="/account/login" method="post">
             @{
                string summaryMsg = Html.GetValidationMessage("lg_summary");
                if (summaryMsg != null)
                {
                    <div class="valid-summary">
                        <p class="estate error">
                            <span class="label">@summaryMsg</span>
                        </p>
                    </div>
                }
            }
           <ul class="valid-simple">
                <li class="field">
                @{
                    string accountMsg = Html.GetValidationMessage("lg_account");
                    if (accountMsg == null)
                    {
                        <p id="msg_account" style="display: none;"></p>
                    }
                    else
                    {
                        <p id="msg_account">@accountMsg</p>
                    }
                }
                <div class="clearfix">
                    <label class="field-name" for="lg_account">Email Address</label>
                    <input id="lg_account" class="input-text" type="text" name="Account" value="@account" data-msgbox="#msg_account" autocomplete="off" tabindex="1"/>
                 </div>
                </li>

                <li class="field"">
                 @{
                    string pwdMsg = Html.GetValidationMessage("lg_pwd");
                    if (pwdMsg == null)
                    {
                        <p id="msg_pwd" style="display: none;"></p>
                    }
                    else
                    {
                        <p id="msg_pwd" style="display: none;">@pwdMsg</p>
                    }
                        
                }
                <div class="clearfix">
                    <label class="field-name" for="lg_pwd">Password</label>
                    <input id="lg_pwd" class="input-text" type="password" name="Password" data-msgbox="#msg_pwd" autocomplete="off" tabindex="2"/>
                </div>
                </li>
                <li class="remember-field clearfix">
                    <span class="remember">
                        <input id="lg_remember" class="chk" type="checkbox" name="rememberMe" value="true" checked="checked"/>
                        <input type="hidden" name="rememberMe" value="false" />
                        <label for="lg_remember">Remember me</label>
                    </span>
                </li>
                <li class="submit-field">
                    <button class="btn btn-large btn-block" type="submit" tabindex="3">Log In</button>
                </li>
            </ul>
        </form>
            <p class="tip">Don't have an account?<a href="/account/signup">Sign up</a></p>
        </div>
    </div>
    <div class="layout-primary-right">
    </div>
</div>